<? 
	$title="Link Pages"; 
	$pageid="3";
	$accessid="a00";
	require("required/dbconnect.php");
	require("required/share_function.php");
	require("required/header.php");
	require("required/function.php");

	
	
		$email=$_POST['email'];
		$chk=mysql_query("select count(*) as result from os_member where email='$email'");
		if(mysql_result($chk,0,"result")>0)
		{
			$success=0;
		}
		else
		{
			$regisdate=date('Y-m-d');
			$insert=mysql_query("insert into os_member (email,status,registerdate)values('$email','inactivate',$regisdate)");
			$success=1;
		
		}
	

		
?>

	<table width="100%" cellpadding="6" cellspacing="0">
		<tr>
			<td class='page_title_bar' valign="top">
			
						Subscribe To Us
					
			</td>
		</tr>	
		<tr>
			<td valign="top" height="400">
			<table width="100%">
 			<td>
				<?
					if($success==0)
					{
				?>
					<div class="dw_failed"><?= $email ?> already in subcriber list.</div>
				<? 
					}
					else
					{
				?>
					<div class="dw_success">Email Subscribed, thank you! </div>
				<?
					}
				?>
			</td>
			</table>
			
			</td>
		</tr> 
</table>

<?  require("required/footer.php"); ?>
